import { baseApi } from "@/api/service";
import type { loginUser, loginResponse, userRegister } from '@/api/service/login/types'
import type { baseResponse } from '@/api/service'

export const login = (data: loginUser) => {
    return baseApi<loginUser, loginResponse>({
        url: '/user/login',
        method: 'post',
        data,
    })
}

export const register = (data: userRegister) => {
    return baseApi<userRegister, baseResponse<null>>({
        url: '/user/register',
        method: 'post',
        data,
    })
}
